package cn.hackcloud.javabase.agent;

interface ClothFactory {
	void productCloth();
}

class NikeFactory implements ClothFactory {

	@Override
	public void productCloth() {
		System.err.println("NIKE衣服");
	}

}

class ProxyFactory implements ClothFactory {
	ClothFactory cf;

	public ProxyFactory(ClothFactory cf) {
		this.cf = cf;
	}

	@Override
	public void productCloth() {
		cf.productCloth();
	}

}

public class TestClothProduct {
	public static void main(String[] args) {
		NikeFactory nikeFactory=new NikeFactory();
		ProxyFactory factory=new ProxyFactory(nikeFactory);
		factory.productCloth();
	}
	
}
